module.exports = {
  publicPath: "./",
  assetsDir: "static",
  productionSourceMap: false,
  pages: {
    index: {
    // 首先修改入口文件地址为examples下的main.js,其次将packages加入打包编译任务中
      entry: "example/mian.js",
      template: "public/index.html",
      filename: "index.html",
    },
  },
  devServer: {
    open: true,
    port: 8080,
  },
  chainWebpack: (config) => {
    config.module
      .rule("js")
      .include.add("/packages")
      .end()
      .use("babel")
      .loader("babel-loader");
  },
};